Ext.define("ap_apply.view.amount_form.AmountForm", {
    extend: "Ext.panel.Panel",
    layout: {
        type: "table",
        columns: 6,
        tableAttrs: {
            style: {
                width: '100%'
            }
        }
    },

    requires: [
        "ap_apply.view.amount_form.AmountFormController",
        "ap_apply.view.amount_form.AmountFormModel",
        "ap_apply.store.apply_form.RegionStore",
        "ap_apply.store.apply_form.CategoryStore",
        "ap_apply.store.apply_form.FoundationTeamStore",
        "ap_apply.store.apply_form.ActivityGroupStore"
    ],
    title: "金额分配明细",
    titleAlign:"center",
    controller: "amount_form-amountform",
    viewModel: {
        type: "amount_form-amountform"
    },
    items: [
        {
            xtype: "label",
            text: "Region",
        }, {
            xtype: "combobox",
            queryMode: 'local',
            displayField: 'name',
            valueField: 'id',
            reference: "region",
            store: {
                type: "region"
            }
        },{
            xtype: "label",
            text: "Category",
        }, {
            xtype: "combobox",
            queryMode: 'local',
            displayField: 'name',
            valueField: 'id',
            reference: "category",
            store: {
                type: "category"
            }
        },{
            xtype: "label",
            text: "Foundation Team",
        }, {
            xtype: "combobox",
            queryMode: 'local',
            displayField: 'name',
            valueField: 'id',
            reference: "foundationTeam",
            store: {
                type: "foundationTeam"
            }
        },{
            xtype: "label",
            text: "Activity Group",
        }, {
            xtype: "combobox",
            queryMode: 'local',
            displayField: 'name',
            valueField: 'id',
            reference: "activityGroup",
            store: {
                type: "activityGroup"
            }
        },{
            xtype: "label",
            text: "Amount"
        }, {
            xtype: "textfield",
            name:"amount",
            bind:"{amount}"
        },{
            xtype: "label",
            text: "",
        }, {
            xtype: "button",
            text:"添加",
            id:"addDetailsBtn",
            listeners:{
                click:"add_detail"
            }

        }
    ]
});
